import service from '@/utils/request'

// @Tags Invitation
// @Summary 创建邀请
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Invitation true "创建邀请"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /invitation/createInvitation [post]
export const createInvitation = (data) => {
  return service({
    url: '/invitation/createInvitation',
    method: 'post',
    data
  })
}

// @Tags Invitation
// @Summary 删除邀请
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Invitation true "删除邀请"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /invitation/deleteInvitation [delete]
export const deleteInvitation = (data) => {
  return service({
    url: '/invitation/deleteInvitation',
    method: 'delete',
    data
  })
}

// @Tags Invitation
// @Summary 批量删除邀请
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除邀请"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /invitation/deleteInvitation [delete]
export const deleteInvitationByIds = (data) => {
  return service({
    url: '/invitation/deleteInvitationByIds',
    method: 'delete',
    data
  })
}

// @Tags Invitation
// @Summary 更新邀请
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Invitation true "更新邀请"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /invitation/updateInvitation [put]
export const updateInvitation = (data) => {
  return service({
    url: '/invitation/updateInvitation',
    method: 'put',
    data
  })
}

// @Tags Invitation
// @Summary 用id查询邀请
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Invitation true "用id查询邀请"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /invitation/findInvitation [get]
export const findInvitation = (params) => {
  return service({
    url: '/invitation/findInvitation',
    method: 'get',
    params
  })
}

// @Tags Invitation
// @Summary 分页获取邀请列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取邀请列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /invitation/getInvitationList [get]
export const getInvitationList = (params) => {
  return service({
    url: '/invitation/getInvitationList',
    method: 'get',
    params
  })
}
